package com.sskj.fabi.bean;

import com.google.gson.annotations.SerializedName;
import com.sskj.common.util.NumberUtil;
import com.sskj.lib.util.CommonUtil;

import java.io.Serializable;

public class FabiListBean implements Serializable {

    /**
     * account : 3841114
     * order_no : 15302613577314929539
     * realname : 郭*
     * trans_num : 100.0000
     * deals_num : 0.0000
     * price : 10.00
     * minPrice : 10.00
     * maxPrice : 1000.00
     * pay_wx : 1
     * pay_alipay : 0
     * pay_backcard : 0
     * add_time : 1530261357
     * amount : 100.0000
     * quota : 10.00-1000.00
     * cd_num : 0
     * rate : 0.0000
     */
    private String id;  // 用户id,用于判断用户是否是购买自己单

    public String getStockUserId() {
        return stockUserId;
    }

    public void setStockUserId(String stockUserId) {
        this.stockUserId = stockUserId;
    }

    private String stockUserId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    private String account;
    @SerializedName(value = "order_no", alternate = {"entrustNo"})
    private String order_no;
    @SerializedName(value = "realname", alternate = {"username"})  // 用户名
    private String realname;

    private String price;
    private String minPrice;
    private String maxPrice;
    private String pay_wx = "0";
    private String pay_alipay = "0";
    private String pay_backcard = "0";
    private String add_time;
    private String amount;
    private String quota;

    private String cd_num;
    private String rate;
    private String transNum;  // 剩余数量
    private String dealsNum;  // 委托数量
    private String totalPrice;

    public String getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    private String payType;  // 支付方式

    public String getTransNum() {
        return transNum;
    }

    public void setTransNum(String transNum) {
        this.transNum = transNum;
    }

    public String getDealsNum() {
        return dealsNum;
    }

    public void setDealsNum(String dealsNum) {
        this.dealsNum = dealsNum;
    }

    public String getLimitNum() {
        return String.format("限额 %s-%s CNY", CommonUtil.dealCNY(minPrice), CommonUtil.dealCNY(maxPrice));
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getOrder_no() {
        return order_no;
    }

    public void setOrder_no(String order_no) {
        this.order_no = order_no;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getPrice() {
        return CommonUtil.dealCNY(price);
    }

    public String getOriginPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(String minPrice) {
        this.minPrice = minPrice;
    }

    public String getMaxPrice() {
        return maxPrice;
    }

    public void setMaxPrice(String maxPrice) {
        this.maxPrice = maxPrice;
    }

    public String getPay_wx() {
        return pay_wx;
    }

    public void setPay_wx(String pay_wx) {
        this.pay_wx = pay_wx;
    }

    public String getPay_alipay() {
        return pay_alipay;
    }

    public void setPay_alipay(String pay_alipay) {
        this.pay_alipay = pay_alipay;
    }

    public String getPay_backcard() {
        return pay_backcard;
    }

    public void setPay_backcard(String pay_backcard) {
        this.pay_backcard = pay_backcard;
    }

    public String getAdd_time() {
        return add_time;
    }

    public void setAdd_time(String add_time) {
        this.add_time = add_time;
    }

    public String getAmount() {
        return amount + " USDT";
    }

    public String getOriginAmount() {
        return amount.replace(",", "");
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getQuota() {
        return quota;
    }

    public void setQuota(String quota) {
        this.quota = quota;
    }

    public String getCd_num() {
        return cd_num;
    }

    public void setCd_num(String cd_num) {
        this.cd_num = cd_num;
    }

    public String getRate() {
        return NumberUtil.keepNoZoreMax4(rate) + "%";
    }

    public void setRate(String rate) {
        this.rate = rate;
    }
}
